import { createRouter, createWebHistory } from 'vue-router'
import { LoginRoute } from '@/views/Login/login'
import { MainRoute } from '@/views/Main/mainRoute'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    ...LoginRoute,
    ...MainRoute,
    {
      path:'/404',
      name:'404',
      component:() => import('../views/ErrorPage/404.vue')
    },
    {
      path:'/503',
      name:'503',
      component:() => import('../views/ErrorPage/503.vue')
    },
    {
      path:'/:pathMatch(.*)',
      redirect:'/404'
    }
  ]
})

export default router
